package core;

import branch.Branch;
import gitobject.Commit;

public class JitLog {
    public static void log() throws Exception {
        Branch branch = new Branch();
        String head=branch.getCommitKey();//读取heads文件内容
        while(head != null){
            Commit latest = Commit.deserialize(head);
            System.out .println("commit " + latest.getKey());
            System.out.println("Author: " + latest.getAuthor());
            System.out.println(latest.getMessage());
            head = latest.getParent();
        }
    }
}
